package fr.enssat.embeddedsoft.projet.fgourvel.spotrin;

import android.app.Activity;
import android.os.Bundle;
import fr.enssat.embeddedsoft.projet.fgourvel.spotrin.bluetooth.BluetoothActivity;

public class SumoGourvellecPotrinActivity extends Activity {
    
	private SensorHandler accelHandler;
	private AccelView accelView;
	private SumoView sumoView;
	private ScoreView scoreView;
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        accelView = (AccelView) findViewById(R.id.idAccelView);
        sumoView = (SumoView) findViewById(R.id.idSumoView);
        
  /* 
        Intent i = new Intent(this,BluetoothActivity.class );
        startActivity(i);
        */

        scoreView = (ScoreView) findViewById(R.id.idScoreView);
        sumoView.setScoreView(scoreView);
        accelHandler = new SensorHandler(this, accelView, sumoView);

    }
    
    @Override
    protected void onResume() {
    	super.onResume();
    }
    
    @Override
    protected void onStop() {
    	super.onStop();
    	accelHandler.clean();
    }
}